From: Doug Barton on
On 04/24/10 16:26, Aristedes Maniatis wrote:
> I'd like to add one more point about this, which might be separate to
> the issue about +IGNOREME. portmaster -a compiles a list of all the
> ports it will upgrade or install and asks if you want to proceed.
> CGatePro is only examined AFTER that point. It does not appear in the
> list before the "Proceed? y/n" question.

What is your exact portmaster command line, and do you have anything in
a portmaster rc file?

> In this case, since it is a package and not a port, why does portmaster
> look at it at all?

The -a option looks at everything /var/db/pkg.


Doug

--

... and that's just a little bit of history repeating.
-- Propellerheads

Improve the effectiveness of your Internet presence with
a domain name makeover! http://SupersetSolutions.com/

_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Aristedes Maniatis on
On 25/04/10 11:37 AM, Doug Barton wrote:
> On 04/24/10 16:26, Aristedes Maniatis wrote:
>> I'd like to add one more point about this, which might be separate to
>> the issue about +IGNOREME. portmaster -a compiles a list of all the
>> ports it will upgrade or install and asks if you want to proceed.
>> CGatePro is only examined AFTER that point. It does not appear in the
>> list before the "Proceed? y/n" question.
>
> What is your exact portmaster command line, and do you have anything in
> a portmaster rc file?

portmaster -a

and the only config is

ALWAYS_SCRUB_DISTFILES=dopt


I also tried with -ai in order to exclude the problem package, but your -x suggestion is even better.


>> In this case, since it is a package and not a port, why does portmaster
>> look at it at all?
>
> The -a option looks at everything /var/db/pkg.

Sure. And this package exists there. But without an origin to point it back to a port directory, hopefully this package should be completely ignored by '-a'.

If you want to play with this particular example on your system, you can grab it from here:

ftp://ftp.stalker.com/pub/CommuniGatePro/5.2/

Quite a nice mail server, and installing it doesn't scatter files all over the place so it is quite safe to try installing. The licensing only comes into play if you add more than 10 mail boxes.


Ari

--
-------------------------->
Aristedes Maniatis
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001 fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Doug Barton on
On 04/24/10 18:50, Aristedes Maniatis wrote:
> On 25/04/10 11:37 AM, Doug Barton wrote:
>
>>> In this case, since it is a package and not a port, why does portmaster
>>> look at it at all?
>>
>> The -a option looks at everything /var/db/pkg.
>
> Sure. And this package exists there. But without an origin to point it
> back to a port directory, hopefully this package should be completely
> ignored by '-a'.

There is no way for portmaster to know that the lack of ORIGIN is an
acceptable situation or not without input from the user. 99.99999% of
the time, not having an ORIGIN in the +CONTENTS file is an error that
requires user attention. For those very rare situations where it's
actually Ok, the +IGNOREME file comes into play.

I've just committed a fix for this problem to the svn (development)
version of portmaster. You can find information on how to download it at
http://dougbarton.us/portmaster-proposal.html. I would appreciate it if
you would test that version in your environment to confirm that the fix
is satisfactory. I've appended the commit message below, but the short
version is that if you just do 'portmaster -a' as you described
previously the package you have installed will be ignored silently. If
you add the -v option, you will see a message about the lack of ORIGIN
and the +IGNOREME file, but portmaster will not exit with an error.

Please let me know how it goes for you. I have a few other small fixes
to add then I would like to release a bugfix version early next week.

In any case, thank you for bringing this to my attention, I think the
fix for this problem is a win overall so I'm glad that your bug report
gave me the opportunity to address it.


hth,

Doug


Log:
Improve the handling of various situations where there is no ORIGIN
recorded in the +CONTENTS file. This is almost always an error in the
package building process, and therefore usually needs to be flagged
and handled as an error. There are (at least) 2 situations where it
may not be an error; bsdpan ports, and when the user has added an
+IGNOREME file (usually for 3rd party packages).

1. Add code to origin_from_pdb() that tests to see that grep returned
something, echos the result as before, then also returns
successfully.
a. If the port is a bsdpan port, return with an error code but let
the caller handle the reporting as appropriate.
b. If there is no ORIGIN but there is an +IGNOREME file don't
report the error unless we're using -v, then also report that
the +IGNOREME file is there. Either way, return with an error
code.
c. If there is no ORIGIN, and no +IGNOREME file, report the error
and return with an error code.

2. In several places this allows several lines of code where the
function is called to be collapsed into:
origin=`origin_from_pdb $iport` || continue

3. In the main body where we parse the command line for what to work
on convert the code that was individually testing the various
conditions that are now handled in origin_from_pdb() to simply
parse the return codes with a case statement.

In the common case (there is an ORIGIN in +CONTENTS) this is almost
certainly a minor optimization since the error handling code in
origin_from_pdb() is never reached, and several places where things
like "is it a bsdpan port?" and other error handling have been
removed.

--

... and that's just a little bit of history repeating.
-- Propellerheads

Improve the effectiveness of your Internet presence with
a domain name makeover! http://SupersetSolutions.com/

_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Aristedes Maniatis on
On 26/04/10 8:55 AM, Doug Barton wrote:
> I've just committed a fix for this problem to the svn (development)
> version of portmaster. You can find information on how to download it at
> http://dougbarton.us/portmaster-proposal.html. I would appreciate it if
> you would test that version in your environment to confirm that the fix
> is satisfactory.

Firstly, it looks like it is unable to run with a relative path. Pretty minor issue, but I thought I'd mention it.

# fetch http://svn.freebsd.org/base/user/dougb/portmaster/portmaster
# sh ./portmaster -ai
===>>> Gathering distinfo list for installed ports

===>>> Starting check of installed ports for available updates
===>>> Checking ports for recursive 'make config'

===>>> Update bacula-client-3.0.3 to bacula-client-5.0.0? y/n [y] y
===>>> Launching child to update bacula-client-3.0.3 to bacula-client-5.0.0
../portmaster: ./portmaster: not found

===>>> Update for bacula-client-3.0.3 failed
===>>> Aborting update


But when using an absolute path

# sh /root/portmaster -ai

it works just nicely. There are still small oddities:

* I get the list of ports to upgrade, then "Proceed y/n", and after that it sees CGatePro and tries to upgrade it. That is, the package is presented after the list of ports is already shown and the user asked to proceed. Shouldn't they be all together? If I say "n" then I never even see the messages about the package with no ORIGIN.

* when using portmaster -ai I'm still given a choice to upgrade the package with no ORIGIN. But why ask since we already know it will fail 100% of the time?



> 99.99999% of
> the time, not having an ORIGIN in the +CONTENTS file is an error that
> requires user attention.

You are the expert in this area, but I don't agree about the 0.000001% usage of packages. Isn't missing ORIGIN going to be the case for every package which isn't installed from ports?

Anyhow, thanks for the fixing the problem so quickly: all the comments above are very minor and are more for feedback than because I expect you to do anything.

Regards

Ari


--
-------------------------->
Aristedes Maniatis
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001 fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Doug Barton on
On 04/25/10 17:15, Aristedes Maniatis wrote:
> On 26/04/10 8:55 AM, Doug Barton wrote:
>> I've just committed a fix for this problem to the svn (development)
>> version of portmaster. You can find information on how to download it at
>> http://dougbarton.us/portmaster-proposal.html. I would appreciate it if
>> you would test that version in your environment to confirm that the fix
>> is satisfactory.
>
> Firstly, it looks like it is unable to run with a relative path. Pretty
> minor issue, but I thought I'd mention it.

yes, there is no way that will work. portmaster calls itself
recursively, so it has to have an explicit path when you start it.

> But when using an absolute path
> # sh /root/portmaster -ai

You could also chmod a+x /root/portmaster and then run it without the
sh, but the way you did it works fine too.

> * I get the list of ports to upgrade, then "Proceed y/n", and after that
> it sees CGatePro and tries to upgrade it.

Yes, I was too hasty to get the fix out the door. I just committed
version 207220 which has a more thorough fix for this issue in -a.

> * when using portmaster -ai I'm still given a choice to upgrade the
> package with no ORIGIN.

I changed the logic for -a to be warn+skip automatically if an +IGNOREME
file is present. For the case of no ORIGIN and no +IGNOREME it's back to
being a fatal error.

> But why ask since we already know it will fail 100% of the time?

Exactly right.


Doug

--

... and that's just a little bit of history repeating.
-- Propellerheads

Improve the effectiveness of your Internet presence with
a domain name makeover! http://SupersetSolutions.com/

_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

First  |  Prev  |  Next  |  Last
Pages: 1 2 3
Prev: INDEX now builds successfully on 6.x
Next: gnuplot crashes