dnbert / prm

PRM Allows you to quickly build package repositories, inspired by Jordan Sissels' FPM
MIT License
250 stars 33 forks source link

allow --directory to support "mv to different --releases" #16

Closed kiranos closed 10 years ago

kiranos commented 11 years ago

I'm compiling my own files and they are depending on different glibc for example, so I need to have one version specific for wheezy and one for squeeze (same software) So I'm thinking to use uniqe version in the deb to separate them. Much like this official package:

apt-cache show apache2-mpm-worker
Version: 2.2.16-6+squeeze7

as its seen they add +squeeze and +wheezy if its for wheezy, I think it would be great for prm to use this layot in custom .debs aswell to look for the specified --releases in command line and if they are found add them to its specific location, not copy to both.

I hope you understand what I mean :)

dnbert commented 11 years ago

Hello! Sorry for the late reply.

I think I understand what you mean, currently PRM uses Arch's to determine where the package should go like so:

a = arch
 if file =~ /^.*#{a}.*\.deb$/i

That's pretty limited, I agree. Right now I look at the individual package names, if +squeeze or +precise were to be appended to the package name, we could sort through those as well.

Is there anything else that you can think of that, that you'd like to see --directory support?

kiranos commented 11 years ago

I dont really know how arch "all" is meant to be handled, I've always used ie386 and amd64 but if all are supposed to be copied to both dirs that would be great to support aswell (I tried all,i386,amd64 to have all as its own branch but my test server didnt pickup the packages.)

yes would be nice to be able to move to the correct release depending on the appended release name of the deb file,

dnbert commented 11 years ago

I need to add in the all/any architecture supports for Debian (I always forget those). I'll make sure those get added in tonight or tomorrow morning. I'll refactor the way it --directory currently works, to help support release context too!

kiranos commented 11 years ago

great! maybe add support for example 2.2.16-6+squeeze7_i386.deb (7 after squeeze) so if it matches

_wheezy_i386*deb and it will be sent to wheezys branch in arch i386.

I've migrated now and use prm for one of my repo's working great! good job :dancers:

dnbert commented 11 years ago

I believe this should work as you want it to now with https://github.com/dnbert/prm/commit/6405ed35dcd756d336c286172aa2957ef18b4c7b

I've tested it myself using asdf_1.2+squeeze.deb (example package) and that works pretty well, and the "any" and "all" architecture types that are valid in Debian work as well.

kiranos commented 11 years ago

been busy at work will try this and verify early next week

kiranos commented 10 years ago

oh sorry forgot about this, I used it in a testcase and seemed to work! thanks