It is currently Mon May 20, 2013 2:40 am

All times are UTC




Post new topic Reply to topic  [ 35 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Package's Dependencies (sugestion)
PostPosted: Mon Jul 09, 2007 1:59 pm 
Experienced Zenwalker
Experienced Zenwalker

Joined: Tue Sep 19, 2006 10:55 am
Posts: 149
Location: [PT] Aveiro
Hi everyone!

I'm starting this topic, because a question about dependencies of packages was raised in a package creation. You can find it here.

Here's the question:
If you have package A that depends on package B and package B depends on C, but the A.dep file lists only package B then a "netpkg A" command will parse B.dep and download C. Me and _PN_boy tested this and concluded that netpkg works like that. So my question is. Why still use flat dependencies in package creation?

Like gapan said:
Quote:
Well, even if it works I believe we should still use flat deps. The main reason for this is simplicity. By just looking at one .dep file you get every package that should be installed for it to work. Nested dependencies can be a really bad thing, mostly when someone needs to test packages or install something without netpkg.  :)


I agree with him about the simplicity, but i think this policy will give many problems, because some times it's really difficult to check all dependencies for one package because they are many. Maybe requiredbuilder should in another way to get the dependencies. (eg. if requiredbuilder could get the dep A of a package and the deps of dep A, and so on, would be great. Working in a recursively way).

I'm raising the question because there are many packages that aren't following this policy. I would like to know more opinions about this.

Regards,

_________________
-- Dennis


 Profile Send private message  
 
 Post subject: Re: Package's Dependencies (sugestion)
PostPosted: Mon Jul 09, 2007 2:38 pm 
Zenwalk Spin-offs
Zenwalk Spin-offs

Joined: Sun Oct 29, 2006 10:59 pm
Posts: 427
Location: Hendersonville, NC
Hey,

I like the current system the way it is. Adding recursive dependencies into requiredbuilder would take more CPU time, and if netpkg already works recursively I see no need for it. There are not many recursive dependencies that I know of either. "If it ain't broke don't fix it." :-)

What does everyone else think though?

Just my thoughts,
sega01

_________________
Go Beyond
Zenserver
Digg


 Profile Send private message  
 
 Post subject: Re: Package's Dependencies (sugestion)
PostPosted: Mon Jul 09, 2007 2:44 pm 
Experienced Zenwalker
Experienced Zenwalker

Joined: Tue Sep 19, 2006 10:55 am
Posts: 149
Location: [PT] Aveiro
Hi,

sega01 wrote:
"If it ain't broke don't fix it." :-)


Sorry but i don't think the same way! Yes it ain't broke, but if we can do better why don't?

Regards,

_________________
-- Dennis


 Profile Send private message  
 
 Post subject: Re: Package's Dependencies (sugestion)
PostPosted: Mon Jul 09, 2007 2:51 pm 
Master of the known universe
Master of the known universe
User avatar

Joined: Fri Jun 01, 2007 10:34 pm
Posts: 1681
Location: Germany
i would go with what gapan said. that's some real advantage i think. but i can understand your point as well. perhaps you should have started this as poll. ;)


 Profile Send private message  
 
 Post subject: Re: Package's Dependencies (sugestion)
PostPosted: Mon Jul 09, 2007 4:14 pm 
Experienced Zenwalker
Experienced Zenwalker

Joined: Tue Sep 19, 2006 10:55 am
Posts: 149
Location: [PT] Aveiro
I don't see so many advantage on that. And yes, the requiredbuilder will take more CPU time to retrieve all dependencies. But i think that time will be consumed for a good cause. Look, like it is now, there's much probability to had wrong dep files, because sometimes we have to add manually deps and when human do things the probability to have a flaw is much higher.

But if there are many people that like flat deps, i think is better to get an automatic way to generate the dep files.

Regards,

_________________
-- Dennis


 Profile Send private message  
 
 Post subject: Re: Package's Dependencies (sugestion)
PostPosted: Mon Jul 09, 2007 4:54 pm 
Zenwalk Spin-offs
Zenwalk Spin-offs

Joined: Sun Oct 29, 2006 10:59 pm
Posts: 427
Location: Hendersonville, NC
Dennis wrote:
But if there are many people that like flat deps, i think is better to get an automatic way to generate the dep files.


They are automatically generated via requiredbuilder currently. Some things might have to be added in manually in rare cases, but it's almost entirely automated. I agree that if it's not broken and can be improved, it should be improved - but how is slowing down requiredbuilder to get it to do something that netpkg does automatically improving it? I see no benefit to this.

Just my thoughts,
sega01

_________________
Go Beyond
Zenserver
Digg


 Profile Send private message  
 
 Post subject: Re: Package's Dependencies (sugestion)
PostPosted: Mon Jul 09, 2007 5:00 pm 
Zenwalk Packager
Zenwalk Packager

Joined: Thu May 25, 2006 9:21 am
Posts: 1788
Location: Portugal
Hi,

The point that Dennis is referring is, example:
some package as a dep on kdelibs, requirebuilder will not put all the deps on kdelibs: "acl,alsa-lib,arts,attr,audiofile,avahi,bzip2,coreutils,cups,cxxlibs,dbus,esound,expat,fontconfig,freetype,gawk,gcc,glib2,gnutls,grep,krb5,libart_lgpl,libdrm,libgcrypt,libgpg-error,libidn,libjpeg,libmad,libogg,libpng,libtiff,libvorbis,libxml2,libxslt,mesa,pcre,perl,qt-base,sudo,xorg,zlib"

;)

Regards,


 Profile Send private message  
 
 Post subject: Re: Package's Dependencies (sugestion)
PostPosted: Tue Jul 10, 2007 9:47 am 

A good example is python related packages like gconvert (in the repos). If requiredbuilder is run on them only python will be reported as a dependency but the .dep file I've made for gconvert lists all python deps:
Code:
atk,bzip2,expat,fontconfig,freetype,gdbm,glib2,gtk+2,libpng,libglade,libxml2,ncurses,openssl,pango,python,readline,xorg,zlib

libglade does not get picked up by requiredbuilder at all but it is absolutely needed so I also added it and its deps.


  
 
 Post subject: Re: Package's Dependencies (sugestion)
PostPosted: Tue Jul 10, 2007 10:26 am 

bruenig wrote:
Not sure python is a good example because python will never report proper dependencies in an automated fashion.

That's exactly why I believe it's a perfect example!  :D


  
 
 Post subject: Re: Package's Dependencies (sugestion)
PostPosted: Wed Jul 11, 2007 6:47 am 

Well, it's a mix of both I think. This discussion started in the rkward testing thread where rkward depends on php, but php's own dependencies were not picked up by requiredbuilder.

Now, should the packager:
(A) manually edit the .dep file to include all deps and go for the flat dependency model or
(B) leave it as it is having recursive dependencies and let netpkg do its thing? In the rkward example, only php gets in rkward.dep file and php's deps are calculated and downloaded with netpkg. In the gconvert example, only "python,libglade" are included in gconver.dep and netpkg installs their deps.

I'd go for (A) for the reason Dennis quoted me on in the 1st post - simplicity.


  
 
 Post subject: Re: Package's Dependencies (sugestion)
PostPosted: Wed Jul 11, 2007 7:27 am 

Well, (C) is really (A) hidden in ZENBUILD so...


  
 
 Post subject: Re: Package's Dependencies (sugestion)
PostPosted: Wed Jul 11, 2007 7:50 am 
Master of the known universe
Master of the known universe
User avatar

Joined: Tue Apr 25, 2006 12:34 pm
Posts: 1155
Location: Rome - Italy
I prefer (B), simply because it is more automatic. (A) is fine, but only if it is possible to perform that in an automatic way... (like netpkg does).
This is my humble opinion  :)

Cheers

_________________
Watcher of the skies, watcher of all!
Image


 Profile Send private message  
 
 Post subject: Re: Package's Dependencies (sugestion)
PostPosted: Wed Jul 11, 2007 8:14 am 
Zenwalk Packager
Zenwalk Packager

Joined: Thu May 25, 2006 9:21 am
Posts: 1788
Location: Portugal
and I'd choose D) make buildpkg handle this for us ;)

Explain:
all packagers will most probably have this file in there systems: /var/netpkg/db/depfile(netpkg created file) this contains all the deps, perhaps buildpkg could do something like(algorithm):
parse the dep line of the package being build;
grep all those deps with something like: "grep -e "$dep1:" /var/netpkg/db/depfile and add those deps to a new dep line(also containing $dep1) the ":" are mandatory, so that it won't happend something like "grep -e "php" /var/netpkg/db/depfile that would report back php and phpmyadmin, per example;
add -u to the line "for deps in \$(echo "\${depstring}" | sed 's/,/\n/g' | sort); do" to stay like: "for deps in \$(echo "\${depstring}" | sed 's/,/\n/g' | sort -u); do" -u for unique, so that no deps are repeated ;)

not tested, but pretty sure it will work ;)

Regards,


 Profile Send private message  
 
 Post subject: Re: Package's Dependencies (sugestion)
PostPosted: Wed Jul 11, 2007 8:24 am 

(D) looks nice but it doesn't work when some of the dependencies are installed manually and not through netpkg.


  
 
 Post subject: Re: Package's Dependencies (sugestion)
PostPosted: Wed Jul 11, 2007 8:34 am 
Master of the known universe
Master of the known universe
User avatar

Joined: Tue Apr 25, 2006 12:34 pm
Posts: 1155
Location: Rome - Italy
_PN_boy wrote:
and I'd choose D) make buildpkg handle this for us ;)

Explain:
all packagers will most probably have this file in there systems: /var/netpkg/db/depfile(netpkg created file) this contains all the deps, perhaps buildpkg could do something like(algorithm):
parse the dep line of the package being build;
grep all those deps with something like: "grep -e "$dep1:" /var/netpkg/db/depfile and add those deps to a new dep line(also containing $dep1) the ":" are mandatory, so that it won't happend something like "grep -e "php" /var/netpkg/db/depfile that would report back php and phpmyadmin, per example;
add -u to the line "for deps in \$(echo "\${depstring}" | sed 's/,/\n/g' | sort); do" to stay like: "for deps in \$(echo "\${depstring}" | sed 's/,/\n/g' | sort -u); do" -u for unique, so that no deps are repeated ;)

not tested, but pretty sure it will work ;)

Regards,


Hi there, this is a nice idea. however, I would implement this in a separated script, so that even those who do not use buildpkg can use it in their buildscript. Moreover, the depfile created by netpkg is there after netpkg has downloaded info from the repo, I guess. What about dependencies of packages that are not in the repo yet? I think it can happen in the case of packages installed by the builder for the preparation of a given package. Am I wrong?

Cheers  :)

EDIT: sorry gapan, I hadn't read yet ;-)

_________________
Watcher of the skies, watcher of all!
Image


 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 35 posts ]  Go to page 1, 2, 3  Next

All times are UTC


 Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
 
cron