Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 170567 - ${FILESDIR} returns bogus values in pkg_*rm
Summary: ${FILESDIR} returns bogus values in pkg_*rm
Status: RESOLVED DUPLICATE of bug 152474
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-12 13:46 UTC by Jakub Moc (RETIRED)
Modified: 2008-02-17 20:59 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Moc (RETIRED) gentoo-dev 2007-03-12 13:46:42 UTC
Using ${FILESDIR} in pkg_*rm returns a value pointing to /var/db/pkg/${CATEGORY}/${PF}/files - which doesn't exist at all. :)

13:25:05 < jakub> uhm, can someone explain to me why ${FILESDIR} gets expanded to /var/db/pkg/${CATEGORY}/${PF}/files in pkg_postrm? the ebuild is in /usr/local/portage...                                                                 
13:29:06 < genone> likely because $O and/or $EBUILD gets set to the vdb location in *rm
13:29:37 < genone> (educated guess)                                                                                                  
13:29:46 < jakub> :=)                                                                                                                
13:30:07 < jakub> well, I don't think this is supposed to be a feature?                                                              
13:30:30 < genone> *rm can't use any $PORTDIR location as the ebuild may no longer exist there
13:30:36 < genone> so yes, it's a feature                                                                                            
13:30:50 < genone> s/ebuild/package                                                                                                  
13:32:36 < jakub> uh... we don't store any stuff from ${FILESDIR} in that location, the output doesn't make sense
13:33:08 < genone> well, what do you want with $FILESDIR in *rm anyway?                                                              
13:33:21 < jakub> see the ebuild...                                                                                                  
13:33:28 < jakub> just point to the files location :)                                                                                
13:33:48 < jakub> oh well, apparently a no go                                                                                        
13:35:19 < genone> right                                                                                                             
13:35:21 < jakub> thanks anyway... maybe the variable shouldn't just be defined at that phase
13:35:32 < jakub> instead of returning bogus values                                                                                  
13:35:43 < genone> maybe                                                                                                             
13:36:01 < genone> or maybe we should copy $FILESDIR to vdb, I don't know                                                            
13:36:05 < jkt|> seems like a perfect example about what to put to the PMS                                                           
13:36:33 < jakub> genone: want a bug?                                                                                                
13:36:46 < jakub> this really kinda sucks                                                                                            
13:37:01 < genone> sure                                                                                                              
13:37:56 < jakub> 'k :)                                                             

Well, either the variable should be undefined in those phases, or maybe we should store the {FILESDIR} contents there? Ideas?
Comment 1 SpanKY gentoo-dev 2007-03-12 16:30:32 UTC
i'd simply mark this a dupe of Bug 152474 ... pkg_* functions should not be accessing $FILESDIR so if it's set to an invalid value, that sounds like a good thing
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2008-02-17 20:59:17 UTC

*** This bug has been marked as a duplicate of bug 152474 ***