Re: PortIndex2MySQL run failure on Sunday 2016-03-06 at 07:00:01

2016-03-06 Thread Clemens Lang
Hi,

On Sun, Mar 06, 2016 at 07:15:29PM +0100, Mojca Miklavec wrote:
> Whooops, I'm sorry, I didn't think about the possibility of this
> scenariot.
> 
> Are you able to help me out to come up with a proper patch or should
> we simply replace
> 
> if {[active_variants gtk3 quartz ""]} {
> default_variants-append +quartz
> } else {
> default_variants-append +x11
> }
> 
> by
> 
> default_variants-append +x11
> 
> ?

See the comments at the top of the active_variants-1.1 PortGroup for an
example that covers this case. Starting at line 34, it explains the
general case and then simplifies down to the special cases. (You are
currently using the second case, but should be using the first one.)

HTH,
Clemens
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: [146276] trunk/dports/databases

2016-03-06 Thread Ryan Schmidt

> On Mar 6, 2016, at 1:22 PM, Mojca Miklavec  wrote:
> 
> On 6 March 2016 at 18:01, Bradley Giesbrecht wrote:
>> 
>> We could remove all ports that depend on mysql4 and mysql5 exclusively or
>> via default variants. The remaining ports would then have their mysql4 or
>> mysql5 variant removed.
>> 
>> The removed ports could be brought back if someone was interested in fixing
>> them.
> 
> That would be a bit harsh, wouldn't it? I bet that a number of ports
> would work with a different database without any additional patches.
> 
> I asked long ago if someone could provide guidelines for transition,
> but nobody did. It's not clear to me what the suggested way is, so
> that we could at least make some consistent changes rather than every
> port switching to a different database with completely different code.
> 
> Mojca

The problem is that Oracle bought MySQL and took it in directions some users 
and developers object to. Therefore, the original developer of MySQL forked it 
and made MariaDB. Some distributions now default to MariaDB, and I would be in 
favor of MacPorts doing that too. But we should use the latest version, which 
is currently 10.1, in the mariadb-10.1 port. Previously we used the port name 
as the variant name, for example +mysql56 to enable mysql56 support. The fact 
that this port name contains a dash and a period is problematic in that dashes 
are not permitted in variant names because that conflicts with the syntax for 
disabling a variant, and the period is not an officially sanctioned character 
to use in a variant name either. Initial tests showed it seemed to work, but 
there are several places in the base code where variant names are validated; 
they all need to be changed to allow a period, if we want to use a period in 
the variant name. Whatever we decide should be applied 
 consistently to all ports, so that they all have the same set of 
MySQL-compatible variants and all default to the same (latest stable) one. Some 
tickets related to these issues:

https://trac.macports.org/ticket/39961

https://trac.macports.org/ticket/43431

https://trac.macports.org/ticket/46807

Bradley, can you add notes to #46807 about what you did so far?

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: [146276] trunk/dports/databases

2016-03-06 Thread Bradley Giesbrecht
> On Mar 6, 2016, at 11:22 AM, Mojca Miklavec  wrote:
> 
> On 6 March 2016 at 18:01, Bradley Giesbrecht wrote:
>> 
>> We could remove all ports that depend on mysql4 and mysql5 exclusively or
>> via default variants. The remaining ports would then have their mysql4 or
>> mysql5 variant removed.
>> 
>> The removed ports could be brought back if someone was interested in fixing
>> them.
> 
> That would be a bit harsh, wouldn't it? I bet that a number of ports
> would work with a different database without any additional patches.
> 
> I asked long ago if someone could provide guidelines for transition,
> but nobody did. It's not clear to me what the suggested way is, so
> that we could at least make some consistent changes rather than every
> port switching to a different database with completely different code.

I propose that someone other then me fix base to allow variants with the same 
naming convention as port names. This would allow variants with hyphens and 
dots. So the hyphens will be problematic, ok.

But the dots are somewhat important. Is +mariadb_101 mariadb 1.01 10.1 or 100?

I looked at updating base to allow dots in variant names and it didn’t look to 
difficult, at one point a I had a patch that worked in my testing, but I didn’t 
feel comfortable enough with base to make the change and the discussion on the 
list didn’t get much traction although I remember people mentioning it would be 
good to not have ambiguous version strings in names of ports and variants.

Coming up with a standard variant name for the mariadb-10.0 and mariadb-10.1 is 
the place to start in my opinion.

A second thought is to create a mysql portgroup which sets some helper 
variables like $mysql_lib_path, $mysql_include_path and $mysql_config_path. The 
portgroup might also have a method to create mysql stub variants to enforce 
variant naming conventions with commented code blocks to show how to test if a 
variant is active and examples of using the portgroups helper variables.


Can we get dots in variant names into base soon?
If not, what should be the standard for variant names when the port it is 
targeting has dots in its name?

—
Brad

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: [146276] trunk/dports/databases

2016-03-06 Thread Mojca Miklavec
On 6 March 2016 at 18:01, Bradley Giesbrecht wrote:
>
> We could remove all ports that depend on mysql4 and mysql5 exclusively or
> via default variants. The remaining ports would then have their mysql4 or
> mysql5 variant removed.
>
> The removed ports could be brought back if someone was interested in fixing
> them.

That would be a bit harsh, wouldn't it? I bet that a number of ports
would work with a different database without any additional patches.

I asked long ago if someone could provide guidelines for transition,
but nobody did. It's not clear to me what the suggested way is, so
that we could at least make some consistent changes rather than every
port switching to a different database with completely different code.

Mojca
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: PortIndex2MySQL run failure on Sunday 2016-03-06 at 07:00:01

2016-03-06 Thread Ryan Schmidt

> On Mar 6, 2016, at 12:15 PM, Mojca Miklavec  wrote:
> 
> On 6 March 2016 at 18:44, Ryan Schmidt wrote:
>> Begin forwarded message:
>> 
>> From: macports-...@lists.macosforge.org
>> Subject: PortIndex2MySQL run failure on Sunday 2016-03-06 at 07:00:01
>> Date: March 6, 2016 at 9:00:18 AM CST
>> To: ad...@macosforge.org
>> 
>> 
>> Synchronizing local ports tree from
>> rsync://rsync.macports.org/release/tarballs/ports.tar
>> receiving file list ... done
>> ports.tar
>> 
>> sent 55810 bytes  received 97 bytes  37271.33 bytes/sec
>> total size is 63344640  speedup is 1133.04
>> receiving file list ... done
>> ports.tar.rmd160
>> 
>> sent 54 bytes  received 101 bytes  103.33 bytes/sec
>> total size is 512  speedup is 3.30
>> Creating port index in
>> /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports
>> Failed to parse file games/angband/Portfile: Error evaluating variants
>> Warning: failed to open old entry for graphics/wxWidgets-3.0, making a new
>> one
>> Adding port graphics/wxWidgets-3.0
>> Adding subport wxWidgets-3.0-libcxx
>> Adding subport wxPython-3.0
>> Failed to parse file graphics/wxWidgets-3.0/Portfile with subport
>> 'wxgtk-3.0': Registry error: gtk3 not registered as installed & active.
>> 
>> Total number of ports parsed: 5
>> Ports successfully parsed: 3
>> Ports failed: 2
>> Up-to-date ports skipped: 19240
> 
> Whooops, I'm sorry, I didn't think about the possibility of this scenariot.
> 
> Are you able to help me out to come up with a proper patch or should
> we simply replace
> 
>if {[active_variants gtk3 quartz ""]} {
>default_variants-append +quartz
>} else {
>default_variants-append +x11
>}
> 
> by
> 
>default_variants-append +x11
> 
> ?
> 
> Feel free to do the commit if you want. We would probably need to add
> an additional "if gtk is active" before "if {[active_variants gtk3
> quartz ""]}", right?

I haven't looked at your code but the usual thing to write would be:

   if {[!variant_isset quartz]} {
   default_variants-append +x11
   }

https://trac.macports.org/wiki/PortfileRecipes#default_variants

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: PortIndex2MySQL run failure on Sunday 2016-03-06 at 07:00:01

2016-03-06 Thread Mojca Miklavec
On 6 March 2016 at 19:15, Mojca Miklavec  wrote:
> On 6 March 2016 at 18:44, Ryan Schmidt wrote:
>> Begin forwarded message:
>>
>> From: macports-...@lists.macosforge.org
>> Subject: PortIndex2MySQL run failure on Sunday 2016-03-06 at 07:00:01
>> Date: March 6, 2016 at 9:00:18 AM CST
>> To: ad...@macosforge.org
>>
>>
>> Synchronizing local ports tree from
>> rsync://rsync.macports.org/release/tarballs/ports.tar
>> receiving file list ... done
>> ports.tar
>>
>> sent 55810 bytes  received 97 bytes  37271.33 bytes/sec
>> total size is 63344640  speedup is 1133.04
>> receiving file list ... done
>> ports.tar.rmd160
>>
>> sent 54 bytes  received 101 bytes  103.33 bytes/sec
>> total size is 512  speedup is 3.30
>> Creating port index in
>> /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports
>> Failed to parse file games/angband/Portfile: Error evaluating variants
>> Warning: failed to open old entry for graphics/wxWidgets-3.0, making a new
>> one
>> Adding port graphics/wxWidgets-3.0
>> Adding subport wxWidgets-3.0-libcxx
>> Adding subport wxPython-3.0
>> Failed to parse file graphics/wxWidgets-3.0/Portfile with subport
>> 'wxgtk-3.0': Registry error: gtk3 not registered as installed & active.
>>
>> Total number of ports parsed: 5
>> Ports successfully parsed: 3
>> Ports failed: 2
>> Up-to-date ports skipped: 19240
>
> Whooops, I'm sorry, I didn't think about the possibility of this scenariot.
>
> Are you able to help me out to come up with a proper patch or should
> we simply replace
>
> if {[active_variants gtk3 quartz ""]} {
> default_variants-append +quartz
> } else {
> default_variants-append +x11
> }
>
> by
>
> default_variants-append +x11
>
> ?
>
> Feel free to do the commit if you want. We would probably need to add
> an additional "if gtk is active" before "if {[active_variants gtk3
> quartz ""]}", right?

I commented this out as a temporary patch, but if you know how to fix
this properly, please do so (+quartz is not quite ready for prime time
anyway).

Thank you,
Mojca
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Fwd: PortIndex2MySQL run failure on Sunday 2016-03-06 at 07:00:01

2016-03-06 Thread Ryan Schmidt
> Begin forwarded message:
> 
> From: macports-...@lists.macosforge.org
> Subject: PortIndex2MySQL run failure on Sunday 2016-03-06 at 07:00:01
> Date: March 6, 2016 at 9:00:18 AM CST
> To: ad...@macosforge.org
> 
> 
> Synchronizing local ports tree from 
> rsync://rsync.macports.org/release/tarballs/ports.tar
> receiving file list ... done
> ports.tar
> 
> sent 55810 bytes  received 97 bytes  37271.33 bytes/sec
> total size is 63344640  speedup is 1133.04
> receiving file list ... done
> ports.tar.rmd160
> 
> sent 54 bytes  received 101 bytes  103.33 bytes/sec
> total size is 512  speedup is 3.30
> Creating port index in 
> /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports
> Failed to parse file games/angband/Portfile: Error evaluating variants
> Warning: failed to open old entry for graphics/wxWidgets-3.0, making a new one
> Adding port graphics/wxWidgets-3.0
> Adding subport wxWidgets-3.0-libcxx
> Adding subport wxPython-3.0
> Failed to parse file graphics/wxWidgets-3.0/Portfile with subport 
> 'wxgtk-3.0': Registry error: gtk3 not registered as installed & active.
> 
> Total number of ports parsed: 5 
> Ports successfully parsed:3 
> Ports failed: 2 
> Up-to-date ports skipped: 19240
> 
> Error: CHILDSTATUS 10315 1: ERROR 1062 (23000) at line 31338: Duplicate entry 
> 'wxWidgets-3.0' for key 'PRIMARY'


___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: [146276] trunk/dports/databases

2016-03-06 Thread Bradley Giesbrecht
> On Mar 5, 2016, at 3:39 AM, Ryan Schmidt  wrote:
> 
>> 
>> On Mar 3, 2016, at 6:10 PM, Bradley Giesbrecht  wrote:
>> 
>>> On Mar 3, 2016, at 12:14 AM, Juan Manuel Palacios  wrote:
>>> 
>>> Bradley,
>>> 
>>> I think you and I already discussed this in some thread, but I can’t 
>>> remember right now… 
>>> 
>>> What’s the point of the mysql5 port now a-days? I’d say it’s redundant with 
>>> mysql51, but not even, ‘cause it’s outdated with respect to it, 5.1.72 Vs. 
>>> 5.1.73. Shouldn’t we just obsolete that port and have it replaced by 
>>> mysql51?
>> 
>> 
>> These ports have dependencies on mysql5 either directly or through variants:
>> port info --name --variants depends:"(\W|^)mysql5(\W|$)" or 
>> variant:"(\W|^)mysql5(\W|$)" | grep -E "^name:|^variants:.*mysql5|—"
>> 
>> Ticket discussing issue:
>> https://trac.macports.org/ticket/43431
> 
> It's been so long, I think it's probably find to make mysql5 replaced_by 
> mysql51, even if there are still ports depending on mysql5. The old php5- 
> ports were deleted awhile ago, even though there are still ancient ports 
> declaring dependencies on them.


We could remove all ports that depend on mysql4 and mysql5 exclusively or via 
default variants. The remaining ports would then have their mysql4 or mysql5 
variant removed.

The removed ports could be brought back if someone was interested in fixing 
them.


Regards,
Bradley Giesbrecht (pixilla)

___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Moving files from foo_select to foo-common

2016-03-06 Thread Mojca Miklavec
Hi,

I would like to move some files from foo_select to foo-common.

Ports foo-1 and foo-2 have a runtime dependency on both foo-common and
foo_select, but I'm not sure how to handle the transition in a proper
way to avoid foo-common overwriting or complaining about files that
have been put there by foo_select.

Also: how are removals of files handled by upgrades of foo_select? Do
the files that are no longer in the select group get removed properly
and automatically?

Mojca
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev