You are not logged in.

#1 2005-07-24 13:38:14

sprintf
Member
From: /bin
Registered: 2005-07-21
Posts: 22

automatic dependancies

there is a fully fledged distro namely T2 (a derivation of rock) which detects dependencies automaticaly.

so what strategy r they using? remember this is a fully scalable multi target OS build ket!!!


is any one going to investigate this?


www.t2-project.org


the archway

Offline

#2 2005-07-24 15:56:54

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: automatic dependancies

We don't need automatic dependency detection!  The people building the vast share of Arch pkgs are more than capable of tracking down a dependency or two.

If you yourself are having problems then all an automatic system does it prevent you from having to learn how to do it yourself - which is silly

Offline

#3 2005-07-24 21:48:19

sprintf
Member
From: /bin
Registered: 2005-07-21
Posts: 22

Re: automatic dependancies

well , i didnt suggest we need an automated dependency detector. if i wanted it then why would i use arch? i would be using one of the linux for dummies distros

why i mentioned about t2 was that  i noticed in the forum about posts on determining depend for a package. t2 does it automatically so by following the t2 strategy any one who wants to do a thorough dependency check can learn where to look for.

thats y i said "is any one going to investigate this?" and then make the findings available here.

pehaps i should have been more clear, the first time round


the archway

Offline

#4 2005-07-25 06:22:31

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: automatic dependancies

you looked at namcap ?


Mr Green

Offline

#5 2005-07-25 09:16:53

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: automatic dependancies

sprintf wrote:

well , i didnt suggest we need an automated dependency detector. if i wanted it then why would i use arch? i would be using one of the linux for dummies distros

why i mentioned about t2 was that  i noticed in the forum about posts on determining depend for a package. t2 does it automatically so by following the t2 strategy any one who wants to do a thorough dependency check can learn where to look for.

thats y i said "is any one going to investigate this?" and then make the findings available here.

What?  If you want to know how T2 does it then go and read their code and find out!  I fail to see your point.  You want the devs/"someone else other than you" to look into it, find out how it's done and spoon-fed it to everyone else without actually incorporating it into the distro?  If you don't want to learn how to do it for yourself without being taught maybe you would be better with a "linux for dummies distro".

Offline

#6 2005-07-25 22:50:56

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: automatic dependancies

this topic has been split, as it is a discussion of something unrelated to the sticky titled "dependancies"

Offline

#7 2005-07-26 10:04:40

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: automatic dependancies

sprintf - let me clarify:

You propose that someone, but not you, should go through the T2 source and scripts to find out how they do dep tracking.

However
· you don't need to use it yourself
· you don't think it should be included in arch


So, are you suggesting it purely for the sake of investigation by an interested party?

No one else seems to have problems with dependecy tracking so forgive me for thinking that you wanted this feature for yourself.  Aside from that there are Arch-specific tools for this purpose and numerous long running debates about the strengths and weaknesses of such tools and their proliferation in Arch.

I apologise for flaming you.  I wasn't actually trying to flame, I was actually trying to kill the thread before 5 more veteran Arch users stormed in and tore you to pieces for the same reason.  i can see now that you may have inadvertantly implied much more than you intended too and that i seized on that unfairly.

I would also like to add that I am not one of the people you mention that can easily read source code but I am familar enough with Arch, Google and email to sort out the limited problems I do meet when tracking dependencies.

Offline

#8 2005-07-26 11:34:25

Algol
Member
Registered: 2005-01-05
Posts: 37

Re: automatic dependancies

Ok, time to play devil's advocate once more ^^

1) Finding something that looks like a gem, somewhere on the vast internet, and then letting people who can truly appreciate it know about it isn't evil and shouldn't be met with hostility.
If you find what looks like a great linux game, and while not being a gamer, you suggest it to your friends who are, you can only hope that they understand that you didn't suggest that game out of spite or to take up more of their time, but since you seriously thought they would be interrested.

2) Automation, if possible, of tasks that are mostly tedious, isn't a bad thing by default. As long as it is done in an obvious, and easy to undestand manner, it is as easy to find out how things work anyway.

It seems by your approach, Dibble, that this has been discussed numerous times before and that it has come to the point when a mere suggestion is offensive. I'm sorry that I havn't read those posts so that I have a deeper understanding of the issue, but what would be so _really_really_bad_ if makepkg, or something similar, had an option to check for dynamically linked libs that are needed and then automatically add them to the deps of the built package? Or a finddeps script that searches the Makefiles to find headers that are needed for compilation and add them to the PKGBUILD.
I have read numerous posts where people who try to make packages fail to set the deps correctly, and while fixed almost instantly by others in the forum, I still think it shows that if available, it would be used.

3) I think the remark that arch didn't *need* automatic dependency detection was to point out that it isn't criticism, and thereby not meant to offend anyone, it's a mere extension of the distro that could be included if found useful.

Sorry to post a reply to a thread you've been trying to kill, Dibble, but next time, a simple "This idea has been discussed, and no one is willing to spend time on it. Feel free to code it, and we'll *might* give it another look." would probably have done a better job.

Offline

#9 2005-07-26 11:47:57

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: automatic dependancies

Algol - we don't need an advocate - we need to be on topic.  I appreciate your need to "help" but what you are doing is adding to the "flame/troll" aspect of this thread rather than helping the thread move on to it's true topic.

Back on topic:

Most people that "fix" those dependecy issues use namcap - which has been around for ages.  Thus, if it was deemed important it would already be included in pacman.  Further, most people would also argue that namcap is sometimes inaccurate and that the best policy is actually to read the manual and webpages of the app in question and find the dependencies from there.  This has been discussed to death.

If there is functionality in T2 that could be included in nampcap for example then maybe it is worth checking out but I doubt Jason will be doing it.  I've apologised for my fault in this regard so can we continue with the topic in question, please?

Offline

#10 2005-07-26 11:52:21

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: automatic dependancies

If someone wants to generate one, it wouldnt be hard.

You could generate a hackish one by running ldd on a binary, then using pacman -Qo to see what packages the libs come from.

Doing this although, would cause unneccesary dependencies in packages, though that could be prevented by recursing down through the dependency tree and checking which deps are required upstream.

Although, for all the trouble it would cause to make, it definitely will not find all the dependencies required for many packages

For the trouble it would cause, it would be much easier to find dependencies yourself. It's really not that hard, read the website, read the ./configure output, read the INSTALL and README files, use common sense.

iphitus

Offline

#11 2005-07-26 11:56:01

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: automatic dependancies

sprintf wrote:

why i mentioned about t2 was that  i noticed in the forum about posts on determining depend for a package.

please can you provide links to these posts, I would like to see how/if they have been resolved smile  The thread you posted in originally was 6 months old and had all the information most people need for resolving dependencies - that's why it is a sticky.

All the other posts I have found about dependencies have nothing to do with filling the depends= field.  Maybe I have missed them?

Offline

#12 2005-07-26 12:39:21

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: automatic dependancies

ok, i took up the challenge anyway, dont anyone here use this script, except to *check* that they have packages.

i couldnt help myself, I saw it as a challenge to script something in bash.

Run as dependency.sh /path/to/binary

#! /bin/bash
Index=0
deps[0]=""
for x in `ldd $* |cut --delimiter=" " --fields=3`;
do
    newdep=`pacman -Qo $x | cut --delimiter=" " --fields=5`
     
    for dep in ${newdep[@]};
    do
        Included=0
        for idep in ${deps[@]};
        do
            if [[ $idep = $dep ]] ; then
                Included=1
            fi    
        done
        if [[ $Included = 0 ]]; then
            Index=`expr $Index + 1`
            deps[$Index]=$dep
        fi
    done        
done
echo ${deps[@]}

eg, dependency.sh /usr/bin/gvim

[ ~ ]$ ./dependency.sh /usr/bin/gvim                                                                             
gtk2 atk glibc pango glib2 xorg ncurses freetype2 fontconfig expat zli

this thing aint perfect! use it only as a checking method.

It picks up dependencies that are already covered, and many programs have unlisted deps that dont come up in this, for example, gcombust depends on cdrecord, but this does not pick it up as it is not linked into the binary.

[ ~ ]$ ./dependency.sh /usr/bin/gcombust                                                                         
gtk glib glibc xorg

please. no flames, i couldnt help myself smile

iphitus

edit: if anyone wants a challenge, try using the Depends On line from pacman -Qi to sort out the extra deps.....

Offline

#13 2005-07-26 12:44:59

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: automatic dependancies

iph - what does that do that namcap does not do?  Not a flame - just a question?

Offline

#14 2005-07-26 12:48:27

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: automatic dependancies

dibblethewrecker wrote:

iph - what does that do that namcap does not do?  Not a flame - just a question?

I never new namcap checked deps, if so, then i just duplicated the work wink

but hey! i learnt more bash! so it was worth it.

iphitus

Offline

#15 2005-07-26 13:14:29

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: automatic dependancies

COOL!  Namcap checks deps by the way wink

Offline

#16 2005-07-26 13:16:23

Algol
Member
Registered: 2005-01-05
Posts: 37

Re: automatic dependancies

dibblethewrecker wrote:

I appreciate your need to "help" but what you are doing is adding to the "flame/troll" aspect of this thread rather than helping the thread move on to it's true topic.

dibble: I was merely trying to bring the thread back from troll/flame to topic, by pointing out that it is a valid subject and not to be scorned without reason. I guess we have different opinions on what is the true topic, but it's back on track now, so whoever is "right" doesn't matter.

iph: Great work! big_smile I was thinking about putting this together too, but bash was never my one of my stronger sides.

iphitus wrote:

It picks up dependencies that are already covered ...

I still think that "unneccesary" deps *should* be listed, as deps of other packages might change in the future and if they happen to be already installed, or pulled in by another package during install, what's the harm in stating them anyway?

Offline

#17 2005-07-26 13:32:19

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: automatic dependancies

Algol wrote:

I still think that "unneccesary" deps *should* be listed, as deps of other packages might change in the future and if they happen to be already installed, or pulled in by another package during install, what's the harm in stating them anyway?

because other packages might change and not need them, therefore pulling in an extra dep!

btw, namcap already does what i did, so just use that instead, pacman -S namcap

iphitus

Offline

#18 2005-07-26 13:40:24

Algol
Member
Registered: 2005-01-05
Posts: 37

Re: automatic dependancies

But that would only be the case if you check packages recursively, which shouldn't be needed anyway?

Installed namcap when dibble wrote about it, great to learn about it too.

Offline

#19 2005-07-26 14:24:47

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: automatic dependancies

Took my ages too!  Believe me it is well huped in the new pkg building guidelines!

Offline

#20 2005-07-26 16:46:21

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: automatic dependancies

iphitus wrote:
dibblethewrecker wrote:

iph - what does that do that namcap does not do?  Not a flame - just a question?

I never new namcap checked deps, if so, then i just duplicated the work wink

but hey! i learnt more bash! so it was worth it.

iphitus

Actually, that's exactly what namcap does - it parses ldd output - the problem is that ldd takes a long ass time on something like X.

IIRC, Xentac was trying to use readelf and things of that nature to speed things up - using ldconfig's cache to get some paths+packages for each library, then cross referencing that with readelf's output... that way there's no need for ldd to lookup libraries everytime (Xentac, back me up here)

Offline

Board footer

Powered by FluxBB