WeBWorK Main Forum

macro file listAnswer.pl missing in 2.19

macro file listAnswer.pl missing in 2.19

by Andras Balogh -
Number of replies: 10
After upgrading to 2.19 from 2.17  from the  CollegeOfIdaho setAlgebra_01_05_ProblemSolvingAndFormulas set 8 of the 20 problems have warnings about not finding the file listAnswer.pl

 
I copied the file over from the old server into the current directory of the problems, but I don't know if there is a better solution.

In reply to Andras Balogh

Re: macro file listAnswer.pl missing in 2.19

by Glenn Rice -
That will work for now. But probably better would be to put the macro in /opt/webwork/pg/macros/deprecated with the CofIdaho_macros.pl file that loads it. I think that it was missed that the CofIdaho_macros.pl file loads that macro, or that is what would have been done to begin with.

I added a pull request to PG to add this macro back.  See https://github.com/openwebwork/pg/pull/1183.
In reply to Andras Balogh

Re: macro file listAnswer.pl missing in 2.19

by Danny Glin -

It looks like those problems were updated last year to no longer use that macro.  If you update your copy of the OPL it should fix the issue for those problems, though there are other problems that still use it, so Glenn's suggestion will fix those as well.

In reply to Danny Glin

Re: macro file listAnswer.pl missing in 2.19

by Glenn Rice -
I actually withdrew the pull request because I saw that those problems have been rewritten to not use the CofIdaho_macros.pl macro.
In reply to Danny Glin

Re: macro file listAnswer.pl missing in 2.19

by Andras Balogh -

Thanks.

I am surprised why my fresh install is out of date.

In reply to Andras Balogh

Re: macro file listAnswer.pl missing in 2.19

by Glenn Rice -

This is one of the downsides of the new release mechanism for the OPL.  The rewrite of those problems was not committed until after the last release.  So if you use the OPL-update script you won't get those changes.  You can use the OPL-update-legacy script and that will pull the latest from the repository.  However, it will also take at least 10 minutes to complete.

In reply to Glenn Rice

Re: macro file listAnswer.pl missing in 2.19

by Danny Glin -
Running OPL-update-legacy does not actually update the OPL files.  It just regenerates the database of files based on what is on your server.

If you want the latest from the OPL you'll need to pull the main branch from GitHub, and then run OPL-update-legacy.
In reply to Danny Glin

Re: macro file listAnswer.pl missing in 2.19

by Andras Balogh -

I tried that unsuccessfully due to divergent branches, following the installation instructions at 

https://webwork.maa.org/wiki/Installation_Manual_for_2.19_on_Ubuntu#Install_the_Ubuntu_24.04_Server_Operating_System

$ cd /opt/webwork/libraries/webwork-open-problem-library $ git remote show origin

* remote origin   Fetch URL: https://github.com/openwebwork/webwork-open-problem-library.git   Push  URL: https://github.com/openwebwork/webwork-open-problem-library.git   HEAD branch: main   Remote branch:     main tracked   Local branch configured for 'git pull':     main merges with remote main   Local ref configured for 'git push':     main pushes to main (local out of date)

$ git pull origin

You asked to pull from the remote 'origin', but did not specify a branch. Because this is not the default configured remote for your current branch, you must specify a branch on the command line.

$ git pull origin main

* branch main -> FETCH_HEAD hint: You have divergent branches and need to specify how to reconcile them. hint: You can do so by running one of the following commands sometime before hint: your next pull: hint: hint: git config pull.rebase false # merge hint: git config pull.rebase true # rebase hint: git config pull.ff only # fast-forward only hint: hint: You can replace "git config" with "git config --global" to set a default hint: preference for all repositories. You can also pass --rebase, --no-rebase, hint: or --ff-only on the command line to override the configured default per hint: invocation. fatal: Need to specify how to reconcile divergent branches.






In reply to Andras Balogh

Re: macro file listAnswer.pl missing in 2.19

by Danny Glin -

Do you have local changes to any OPL problems?  That will determine the best way to proceed.  What does "git status" return?

In reply to Danny Glin

Re: macro file listAnswer.pl missing in 2.19

by Andras Balogh -

I am not aware of any local changes to the OPL. We always make copies inside courses if  we want modifications.

"git status" returns

Refresh index: 100% (85631/85631), done.

On branch v2024-08-14

Untracked files:

  (use "git add <file>..." to include in what will be committed)

TABLE-DUMP/

nothing added to commit but untracked files present (use "git add" to track)


I see the file OPL-tables.sql in the TABLE-DUMP directory.

In reply to Andras Balogh

Re: macro file listAnswer.pl missing in 2.19

by Glenn Rice -

You first need to run "git checkout origin/main" to switch back to the main branch.  You are currently on the v2024-08-14 branch.  That is a branch created from the v2024-08-14 tag.  The OPL-update script switched you to that branch.

After switching back to the main branch, then run "git pull" to get the latest OPL changes.