Repository: conan-io/conan-center-index

Issue:
[package] libpciaccess/0.16: TypeError: __init__() got an unexpected keyword argument 'build_script_folder' with conan 1.49.0
### Package and Environment Details

* Package Name/Version: **libpciaccess/0.16**
* Operating System+version: **Fedora 34 x86_64**
* Compiler+version: **gcc 11.3.1**
* Conan version: **conan 1.49.0**
* Python version: **Python 3.9.13**


### Conan profile

```
Configuration for profile default:

[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=11
compiler.libcxx=libstdc++11
build_type=Release
[options]
[conf]
[build_requires]
[env]
```


### Steps to reproduce

Simply run `conan install libpciaccess/0.16@ --build` using conan 1.49.0.

Expected result:
libpciaccess/0.16 is successfully built and made available in conan cache.

Actual result:
Build fails with the following error:

```
libpciaccess/0.16: 
libpciaccess/0.16: ERROR: Package 'dfbe50feef7f3c6223a476cd5aeadb687084a646' build failed
libpciaccess/0.16: WARN: Build folder /home/ts/.conan/data/libpciaccess/0.16/_/_/build/dfbe50feef7f3c6223a476cd5aeadb687084a646
ERROR: libpciaccess/0.16: Error in build() method, line 66
	autotools = Autotools(self, build_script_folder=self._source_subfolder)
	TypeError: __init__() got an unexpected keyword argument 'build_script_folder'

```
The problem appears to be that the changes merged in #11021 which reverts the fix introduced for #10909 in #10910 hasn't been updated in the conan center. Possibly because it reverts to a previous version?

### Logs

_No response_


Discussion:
Both Conan versions 1.49.0, 1.48.2 and 1.47.0 work fine with `build_script_folder`. Or, you are running an older version, or you are trying to use a cached and outdated recipe.

- Check your current version `python -m conans.conan --version` and be careful with multiple Conan versions installed in your machine.
- Update your local copy with `conan install <package_name> --update` (reference [here](https://docs.conan.io/en/latest/reference/commands/consumer/install.html))
the recipe we get on conan-center is not the one on conan-center-index. compare https://conan.io/center/libpciaccess?tab=configuration to https://github.com/conan-io/conan-center-index/blob/master/recipes/libpciaccess/all/conanfile.py
@ericLemanissier the conan.io/center can not be used as parameter, because it uses a separated scheduled service to collect recipes from Conan Center and show there, it's delayed. I would say the best option is conan command against conancenter. 

Anyway, I gonna take a look on it. Thank you for reporting. 
kmod and ruby have the same problem, after https://github.com/conan-io/conan-center-index/pull/11020 and https://github.com/conan-io/conan-center-index/pull/11019
confirmed, it does not work when building directly from conan center with conan install command.
I think the simplest solution is simply to add a newline somewhere in the recipe, to create a revision which is actually new

Resolving patch:
diff --git a/recipes/libpciaccess/all/conanfile.py b/recipes/libpciaccess/all/conanfile.py
--- a/recipes/libpciaccess/all/conanfile.py
+++ b/recipes/libpciaccess/all/conanfile.py
@@ -1,10 +1,10 @@
 import os
-
 from conan.tools.gnu import Autotools, AutotoolsToolchain
 from conans import ConanFile, tools
 from conans.errors import ConanInvalidConfiguration
 
-required_conan_version = ">=1.33.0"
+
+required_conan_version = ">=1.44.0"
 
 
 class LibPciAccessConan(ConanFile):
@@ -19,8 +19,9 @@ class LibPciAccessConan(ConanFile):
     options = {"shared": [True, False], "fPIC": [True, False]}
     default_options = {"shared": False, "fPIC": True}
 
-    _source_subfolder = "source_subfolder"
-    _build_subfolder = "build_subfolder"
+    @property
+    def _source_subfolder(self):
+        return "source_subfolder"
 
     def validate(self):
         def is_supported(settings):
@@ -55,7 +56,6 @@ def source(self):
                   strip_root=True, destination=self._source_subfolder)
 
     def build(self):
-        # autoreconf
         self.run("{} -fiv".format(tools.get_env("AUTORECONF") or "autoreconf"),
                  win_bash=tools.os_info.is_windows, run_environment=True, cwd=self._source_subfolder)
 
@@ -75,5 +75,5 @@ def package(self):
             self.package_folder, "lib"), "*.la")
 
     def package_info(self):
-        self.cpp_info.libs = tools.collect_libs(self)
+        self.cpp_info.libs = ["pciaccess"]
         self.cpp_info.set_property("pkg_config_name", "pciaccess")


Test patch:
diff --git a/recipes/libpciaccess/all/test_package/conanfile.py b/recipes/libpciaccess/all/test_package/conanfile.py
--- a/recipes/libpciaccess/all/test_package/conanfile.py
+++ b/recipes/libpciaccess/all/test_package/conanfile.py
@@ -1,6 +1,6 @@
 import os
 
-from conan.tools.cmake import CMake, CMakeToolchain
+from conan.tools.cmake import CMake
 from conans import ConanFile, tools
 
 
diff --git a/recipes/libpciaccess/all/test_package/test_package.c b/recipes/libpciaccess/all/test_package/test_package.c
--- a/recipes/libpciaccess/all/test_package/test_package.c
+++ b/recipes/libpciaccess/all/test_package/test_package.c
@@ -1,9 +1,8 @@
-#include <stdio.h>
+#include <stdlib.h>
 #include <pciaccess.h>
 
-int main()
-{
-    int res = pci_system_init();
+int main(void) {
+    pci_system_init();
     pci_system_cleanup();
-    return res;
+    return EXIT_SUCCESS;
 }