Discussion:
using "--nodeps" with rpmbuild is it possible?
diego bowen
2007-09-27 00:31:14 UTC
Permalink
Hello I’ve installed DBI via cpan (so everything is bundled) and I’ve created a new rpm however I'm still getting stuff like:

after running rpmbuild --bb --defines .......

Requires: /usr/bin/perl perl(DBI) perl(Sys::Syslog)
........
........
+ ssh ***@diego /usr/bin/sudo /bin/rpm -Uv /var/tmp/rpm.31117
Suggested resolutions:
perl-DBI-1.40-8.i386.rpm
error: Failed dependencies:
perl(DBI) is needed by my-new-new-2.15-1.i386


Can i use "--nodeps" so that it doesnt check for this rpm that is probably installed via the cpan bundle. "rpmbuild --nodeps" doesnt seems to work .....please advise. thanks


---------------------------------
Check out the hottest 2008 models today at Yahoo! Autos.
Tim Mooney
2007-09-27 20:43:50 UTC
Permalink
Post by diego bowen
after running rpmbuild --bb --defines .......
Requires: /usr/bin/perl perl(DBI) perl(Sys::Syslog)
........
........
perl-DBI-1.40-8.i386.rpm
perl(DBI) is needed by my-new-new-2.15-1.i386
Can i use "--nodeps" so that it doesnt check for this rpm that is
probably installed via the cpan bundle. "rpmbuild --nodeps" doesnt
seems to work .....please advise. thanks
--nodeps is only used at install time (not build time), to work around
a package that has dependencies that you want to ignore.

At build time, if you don't want your package to gather any dependency
information, you accomplish that by adding

AutoReqProv: no

to the header of the spec file. See "Maximum RPM" for more information.

Note that turning off all dependency information for an RPM you build
can cause problems and frustrate your customers too. Assuming you're
building with a version of RPM that's relatively modern, there are ways
to remove just certain dependencies (leaving the rest). You do that
by redefining macro that specifies what tool is used to find the
requirements (for perl, the macro is likely named %__perl_requires),
and then including your own custom version of that script that doesn't
output the dependencies you want to avoid.

Tim
--
Tim Mooney ***@dogbert.cc.ndsu.NoDak.edu
Information Technology Services (701) 231-1076 (Voice)
Room 242-J6, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
Jos Vos
2007-09-27 21:01:02 UTC
Permalink
Post by Tim Mooney
--nodeps is only used at install time (not build time), to work around
a package that has dependencies that you want to ignore.
Just for completeness: --nodeps *can* be specified with rpmbuild, but
then it means that the build requirements (BuildRequires header lines)
should be ignored. In most cases not very useful, except when you
only want to build a source rpm (rpmbuild -bs).
--
-- Jos Vos <***@xos.nl>
-- X/OS Experts in Open Systems BV | Phone: +31 20 6938364
-- Amsterdam, The Netherlands | Fax: +31 20 6948204
Tim Mooney
2007-09-27 21:02:07 UTC
Permalink
Post by Jos Vos
Post by Tim Mooney
--nodeps is only used at install time (not build time), to work around
a package that has dependencies that you want to ignore.
Just for completeness: --nodeps *can* be specified with rpmbuild, but
then it means that the build requirements (BuildRequires header lines)
should be ignored. In most cases not very useful, except when you
only want to build a source rpm (rpmbuild -bs).
Thanks for the clarification. I wasn't aware of this, but it makes sense
in retrospect.

Tim
--
Tim Mooney ***@dogbert.cc.ndsu.NoDak.edu
Information Technology Services (701) 231-1076 (Voice)
Room 242-J6, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
R P Herrold
2007-09-27 21:45:01 UTC
Permalink
Post by Tim Mooney
Post by diego bowen
Can i use "--nodeps" so that it doesnt check for this rpm that is
probably installed via the cpan bundle. "rpmbuild --nodeps" doesnt
seems to work .....please advise. thanks
--nodeps is only used at install time (not build time), to work around
a package that has dependencies that you want to ignore.
?? --nodeps works fine with rpmbuild

-- Russ Herrold
diego bowen
2007-09-27 21:47:58 UTC
Permalink
I just tested this got rid of the "nodeps" option with "rpmbuild" and used it in the "/bin/rpm --nodeps -Uv /var/tmp/rpm.$PID" and it worked fine!! Thanks.....the rpmbuild man page should be more clear on this.....:)
Post by Tim Mooney
Post by diego bowen
Can i use "--nodeps" so that it doesnt check for this rpm that is
probably installed via the cpan bundle. "rpmbuild --nodeps" doesnt
seems to work .....please advise. thanks
--nodeps is only used at install time (not build time), to work around
a package that has dependencies that you want to ignore.
?? --nodeps works fine with rpmbuild

-- Russ Herrold

_______________________________________________
Rpm-list mailing list
Rpm-***@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list



---------------------------------
Got a little couch potato?
Check out fun summer activities for kids.
Tony Earnshaw
2007-09-28 06:24:31 UTC
Permalink
Post by diego bowen
I just tested this got rid of the "nodeps" option with "rpmbuild" and
used it in the "/bin/rpm --nodeps -Uv /var/tmp/rpm.$PID" and it worked
fine!! Thanks.....the rpmbuild man page should be more clear on
this.....:)
As you've probably found out by now, rpmbuild --nodeps will get rid of
the dependency check during the build, but not when you come to install
the resulting rpm, unless you use it again. Also, using rpmbuild
--nodeps means that the build will fail on stuff which might be
specified in BuildRequires.

Tim's way is the only way to go.

--Tonni
--
Tony Earnshaw
Email: tonni at hetnet dot nl
Loading...